package com.jida.tijian.controller;

import com.jida.tijian.domain.Setmeal;
import com.jida.tijian.domain.Users;
import com.jida.tijian.dto.ResponseObject;
import com.jida.tijian.service.SetmealService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/*
 处理套餐模块需求
 */
@RestController
public class SetMealController {

    @Autowired
    SetmealService setmealService;
    /*
        再选择套餐界面
        套餐和检查项是一对多的关系

     */
    @RequestMapping("/listSetmeal")
    public ResponseObject listSetMeal(@RequestBody Users users)
    {
        return setmealService.listSetmeal(users.getSex());
    }
    @RequestMapping("/loadSetmeal")
    public ResponseObject loadSetmeal(@RequestBody Setmeal setmeal)
    {
        return new ResponseObject(ResponseObject.SUCCESS_STATUS,setmealService.loadSetmeal(setmeal),ResponseObject.SUCCESS_DESC);
    }
}
